<template>
  <div>
    <Row>
      <Col span="8">
        <Card class="cardLeft" style="margin: 10px">
          <span style="font-size: 21px;font-weight: bold">已检测违规数</span>
          <div>
            <Scroll height="200">
              <div dis-hover v-for="(item, index) in arrayList.sum" :key="index" style="margin: 0px 0" class="item">
                <Row>
                  <Col span="12"><span>{{ item.name }}</span></Col>
                  <Col span="12"><span>{{ item.num }}</span></Col>
                </Row>
              </div>
            </Scroll>
          </div>
        </Card>
      </Col>
      <Col span="8">
        <Card class="cardMiddle" style="margin: 10px">
          <span style="font-size: 21px;font-weight: bold">检测错误数</span>
          <div>
            <Scroll height="200">
              <div dis-hover v-for="(item, index) in arrayList.error" :key="index" style="margin: 0px 0" class="item">
                <Row>
                  <Col span="12"><span>{{ item.name }}</span></Col>
                  <Col span="12"><span>{{ item.num }}</span></Col>
                </Row>
              </div>
            </Scroll>
          </div>
        </Card>
      </Col>
      <Col span="8">
        <Card class="cardRight" style="margin: 10px">
          <span style="font-size: 21px;font-weight: bold">模型正确率</span>
          <div>
            <Scroll height="200">
              <div dis-hover v-for="(item, index) in arrayList.correct" :key="index" style="margin: 0px 0" class="item">
                <Row>
                  <Col span="12"><span>{{ item.name }}</span></Col>
                  <Col span="12"><span>{{ item.num }}%</span></Col>
                </Row>
              </div>
            </Scroll>
          </div>
        </Card>
      </Col>
    </Row>
    <header>
      <Card>
        <span>违规类型：</span>
        <Select v-model="queryData.type" style="width:200px">
          <Option v-for="item in violateType" :value="item.udvtypeId" :key="item.udvtypeId">{{
              item.udvtypeName
            }}
          </Option>
        </Select>
        <Button type="primary" @click="queryList" class="query">查询</Button>
        <Button @click="reset" class="reset">重置</Button>
      </Card>
    </header>
    <div>
      <Table stripe :columns="columns1" :data="data1">
        <template slot-scope="{ row }" slot="image">
          <img :src="row.udvtypeImage" style="height: 50px;width: 50px" @click="largeImage(row)"/>
        </template>
        <template slot="action" slot-scope="{ row, index }">
          <Button type="primary" @click="detail(index)" size="small">重新检测</Button>
          <Button type="success" @click="retrain(index)" size="small">重新训练</Button>
          <Button type="error" @click="deleteRecord(index)" size="small">删除</Button>
        </template>
      </Table>
    </div>
    <div style="margin: 10px;overflow: hidden">
      <div style="float: right;">
        <Page :total="100" :current="queryData.currentPage" @on-change="changePage" @on-page-size-change="changeSize"
              show-elevator show-sizer></Page>
      </div>
    </div>
    <Modal
      v-model="modal1"
      title="照片详情"
      width="480px"
      @on-ok="ok">
      <img :src="maxImg" style="width: 450px;">
    </Modal>
  </div>
</template>

<script>
import {deleteCompleteRecord, getAllViolationType, getErrorViolation, getViolationSumData} from "../../../api/data";

export default {
  name: "model_training",
  data() {
    return {
      maxImg: '',
      modal1: false,
      queryData: {
        type: '7',
        page: '1',
        limit: '10'
      },
      arrayList: {
        sum: [
          {
            typeId: '',
            name: '全部',
            num: 100
          },
          {
            violationName: '打电话',
            count: 10
          },
          {
            violationName: '抽烟',
            count: 10
          },
          {
            violationName: '酒后驾车',
            count: 10
          },
          {
            violationName: '吃东西',
            count: 10
          },
          {
            violationName: '双手离开方向盘',
            count: 10
          },
          {
            violationName: '手持异物',
            count: 10
          },
          {
            violationName: '注意力不集中',
            count: 10
          },
          {
            violationName: '闭眼',
            count: 10
          },
          {
            violationName: '打哈欠',
            count: 10
          },
        ],
        error: [
          {
            violationName: '全部',
            count: 10
          },
          {
            violationName: '打电话',
            count: 1
          },
          {
            violationName: '抽烟',
            count: 1
          },
          {
            violationName: '酒后驾车',
            count: 1
          },
          {
            violationName: '吃东西',
            count: 1
          },
          {
            violationName: '双手离开方向盘',
            count: 1
          },
          {
            violationName: '手持异物',
            count: 1
          },
          {
            violationName: '注意力不集中',
            count: 1
          },
          {
            violationName: '闭眼',
            count: 1
          },
          {
            violationName: '打哈欠',
            count: 1
          },
        ],
        correct: [
          {
            violationName: '全部',
            count: 90
          },
          {
            violationName: '打电话',
            count: 90
          },
          {
            violationName: '抽烟',
            count: 90
          },
          {
            violationName: '酒后驾车',
            count: 90
          },
          {
            violationName: '吃东西',
            count: 90
          },
          {
            violationName: '双手离开方向盘',
            count: 90
          },
          {
            violationName: '手持异物',
            count: 90
          },
          {
            violationName: '注意力不集中',
            count: 90
          },
          {
            violationName: '闭眼',
            count: 90
          },
          {
            violationName: '打哈欠',
            count: 90
          },
        ]
      },
      violateType: [],
      columns1: [
        {
          title: '编号',
          key: 'udvrecordId'
        },
        {
          title: '姓名',
          key: 'name'
        },
        {
          title: '违规行为',
          key: 'udvtypeName'
        },
        {
          title: '图片',
          key: 'image',
          slot: 'image',
        },
        {
          title: '操作',
          key: 'action',
          slot: 'action',
          align: 'center'
        }
      ],
      data1: [
        {
          udvrecordId: '1',
          name: '张三',
          udvtypeName: '抽烟',
          udvtypeImage: '',
          createTime: '2022-02-05',
          udvrecordLocation: '第三道',
          image: '/9j/4AAQSkZJRgABAQEAkACQAAD/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAEAAAAAAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCABsAGwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEI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dqeQ/stfs+eJP2grrWdF0W2m/suH95c6pbQBClyI3+yx+ewBVPMYTNGCCwjHG4IV/UXQPAniCK/wBJbWrmS6n09RunsxDHFcsY1SSSRy4leV9vzyBEDcjbt4ra+F/wU8KfBbwdY6H4Z0a103T9Od5oQF3yNK67XlZ2yzSMvBcnJHHA4rrHdnRtzE7eB7CvrsDhVh4Wsr9Xv+f+Vz+V+MOJJ51jXWd40l8Mdnra7bWrbtqr2SskinpeiW+kzzNFJeYmxmOS7lmjTGcbEdiqdf4QB09Bif5vepVGE/GlVC44/mK6ZPU+T5ubcyfCnzeFNLPXdZwn/wAhrV/FZ3gwbvBmjt/esLc/+Q1rQPBrcmnuLj2oVih4z+VNzRmg6ug6ULPbSQyIJIZlKSxuu5JVPBVgeCCOMGvH/iD+wD8G/iZM82oeA9LtbmQ5afSmk01yfUiBkQn3KmvXs0o5NZ1KMJ/Gr+p0YXGYnCz9phqkoP8Autr8mj5bvf8Agjt8H7q5Z47rxxaox4ii1WJlX6F4Gb8ya0/DP/BJT4K6DIrXWm+I9c2sG232sSKp9iIBFxX0hRmuf+z8OtoL7j2p8YZ5JcjxdS3+J/ne5zfwy+BXgv4JR48I+FdC8PM0exprO0VLiVfR5eZG/wCBMa6aWbd8zfrToRukX61VvrD+0INvnTQ7eT5Tbd47qfVTnBHpW3s4x0SPmcVWqVantKsnKXdu7+96lpZFZCBIpKjlQRxnpn8qfnO9P4uDt74PTj8D+Vc1N8MNPfZ5kt5M2dwd3G4AZCr0+6vYVRHwa061dyLzVWaWUTA+eq+XjbhFCqBsH905HXuTmjFyZ2g+6OKfBMuz7ydfU8flXmjfB/TYLYKtxqASM5CmRWBGMYOVPy+3StbwnYxeBdNe1s18yOaQzMZmLNuIC9RjjCipcbk6o//Z'
        }
      ]
    }
  },
  methods: {
    changePage(pageNumber) {
      this.queryData.page = pageNumber
      this.queryList()
    },
    changeSize(pageSize) {
      this.queryData.limit = pageSize
    },
    getAllViolationType_() {
      getAllViolationType().then(res => {
        this.violateType = res.data.obj
      }).catch(err => {
      })
    },
    largeImage(row) {
      this.maxImg = row.udvtypeImage;
      this.modal1 = true;
    },
    queryList(){
      getErrorViolation(this.queryData).then(res => {
        res.data.obj.forEach(item=>{
          item.udvtypeImage="data:image/png;base64,"+item.udvtypeImage;
        })
        this.data1 = res.data.obj
      }).catch(err => {
      })
    },
    deleteRecord(index){
      deleteCompleteRecord(this.data1[index].udvrecordId).then(res => {

      }).catch(err => {
      })

    },
    getViolationSumDataVue(){
      getViolationSumData().then(res=>{
        console.log(res.data.obj)
        let temp = res.data.obj
        this.arrayList.sum = temp[0];
        this.arrayList.error = temp[1];
        // this.arrayList.correct = temp[1];
        for(let i=0;i<this.arrayList.sum.length;i++) {
          this.arrayList.correct[i].typeId=this.arrayList.sum[i].typeId;
          this.arrayList.correct[i].name=this.arrayList.sum[i].name;
          if (this.arrayList.sum[i].num == 0) {
            this.arrayList.correct[i].num = 100;
          }else{
            this.arrayList.correct[i].num= (1-this.arrayList.error[i].num/ this.arrayList.sum[i].num)*100
          }
        }
      }).catch(err=>{

      })
    },
    ok() {

    },
    click() {

    },
    reset() {

    }
  },
  mounted() {
    this.getAllViolationType_()
    this.getViolationSumDataVue()
  }
}
</script>

<style scoped>
.cardLeft {

}

.cardMiddle {

}

.cardRight {

}

.ivu-card-bordered .cardLeft {
  border-left-color: #4d96e2;
  border-left-width: 4px;
  /*border-right: none;*/
  /*border-bottom: none;*/
  /*border-top: none;*/
  margin-right: 16px;
}

.ivu-card-bordered .cardMiddle {
  border-left-color: #2a8d42;
  border-left-width: 4px;
  /*border-bottom: none;*/
  /*border-top: none;*/
  /*border-right: none;*/
  margin-right: 16px;
}

.ivu-card-bordered .cardRight {
  border-left-color: #e0bd0e;
  border-left-width: 4px;
  /*border-bottom: none;*/
  /*border-top: none;*/
  /*border-right: none;*/
  margin-right: 3px;
}

.infoCard {
  height: 200px;
  padding-bottom: 10px;
}

.title {
  font-size: 25px;
  font-weight: bold;
  margin-bottom: 20px;
}

span {
  margin: 10px;
}

Button {
  margin-left: 10px;
}

.item {
  margin: 0px;
}
</style>
